import request from "@/utils/request";

export default {

  saveOrUpdateBlog(blog) {
    return request({
      url: `/admin/blog/save`,
      method: 'POST',
      data: blog
    })
  },
  getBlogByPage(currentPage, limit, queryParams) {
    return request({
      url: `/admin/blog/blogs/${currentPage}/${limit}`,
      method: `POST`,
      data: queryParams,
    })
  },
  deleteBlogById(blogId) {
    return request({
      url: `/admin/blog/del/${blogId}`,
      method: `DELETE`,
    })
  },
  getBlogInfoById(id) {
    return request({
      url: `/admin/blog/info/${id}`,
      method: `GET`,
    })
  }

}